<?php
namespace frontend\controllers;

use Yii;
use yii\web\Controller;
use backend\models\User;

/**
 * Site controller
 */
class SiteController extends Controller
{
    /**
     * Displays homepage.
     *
     * @return mixed
     */
    public function actionIndex()
    {
       /* $wechat = Yii::$app->wechat;
        $data = $wechat->getMemberList();
        foreach($data['data']['openid'] as $value){
            $model = new User();
            $model->oppenid = $value;
            $model->save();
        }
        */
    }

    public function actionTest(){
        $wechat = Yii::$app->wechat;
        var_dump($wechat->token);
        echo '<br>';
        var_dump($wechat->getGroups());
    }


}
